#ifndef PROCESSWIN_H
#define PROCESSWIN_H

#include "Plugin.h"
#include "glimagewidget.h"
#include <QWidget>
#include <QSplitter>
#include <QListWidgetItem>
namespace Ui {
class ProcessWin;
}

class ProcessWin : public QWidget
{
    Q_OBJECT
public:
    Plugin *plugin;
    Ui::ProcessWin *ui;
    GLImageWidget *imageWin;
    GLImageWidget *resultWin;
    QSplitter *splitter;
public:
    explicit ProcessWin(Plugin *p, QWidget *parent = nullptr);
    ~ProcessWin();
    void processMsg(void *win){imageWin->processMsg(win);resultWin->processMsg(win);}
signals:
    void showSrc(QImage img);
    void showResult(QImage img);
public slots:
    void slot_btnClicked();

    void fun_doubleClicked(const QModelIndex &index);
    void fun_itemClicked(QListWidgetItem *item);
    void fun_currentRowChanged(int currentRow);
    void selected_currentRowChanged(int currentRow);
    void selected_doubleClicked(const QModelIndex &index);
    void selected_itemClicked(QListWidgetItem *item);
    void txtArg_textChanged();
private:
    void resizeEvent(QResizeEvent *);
};

#endif // PROCESSWIN_H
